projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47cf17c
)
rate-limit the glyph cache dumping
author
Matthias Clasen
<mclasen@redhat.com>
Mon, 11 Sep 2017 15:15:00 +0000
(11:15 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Mon, 11 Sep 2017 15:15:00 +0000
(11:15 -0400)
Writing the file out every frame really isn't necessary.
Do it once per second.
gsk/gskvulkanrenderer.c
patch
|
blob
|
history
diff --git
a/gsk/gskvulkanrenderer.c
b/gsk/gskvulkanrenderer.c
index 39313cdaf9867e6f4d296ead0cd767333024c892..109f487f1d635f7fa5bda8aeb21d2328417cee36 100644
(file)
--- a/
gsk/gskvulkanrenderer.c
+++ b/
gsk/gskvulkanrenderer.c
@@
-642,10
+642,18
@@
dump_glyph_cache_stats (GlyphCache *cache)
{
GHashTableIter iter;
FontEntry *fe;
+ static gint64 time;
+ gint64 now;
if (!cache->fonts)
return;
+ now = g_get_monotonic_time ();
+ if (now - time < 1000000)
+ return;
+
+ time = now;
+
g_print ("Glyph cache:\n");
g_hash_table_iter_init (&iter, cache->fonts);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *)&fe))